<?php 
 namespace Home\Controller;
 use Think\Controller;
class BlogController extends Controller {

    public function login(){

     	//echo"this is my first blog";
        /*echo"<br>";
        默认模块(home)
        echo C('DEFAULT_MODULE');echo"<br>";
        默认的控制器(index)
        echo C('DEFAULT_CONTROLLER');echo "<br>";
        //默认方法(index)
        echo C('DEFAULT_ACTION');echo"<br>";
        模块的名字(home)
        echo MODULE_NAME;echo"<br>";
        控制器的名字(blog)
        echo CONTROLLER_NAME;echo"<br>";
        //方法名
        echo ACTION_NAME;
        echo "this is my first blog";*/
        $arr=array('kang','bang','zang');
        $this->assign('arr',$arr);

        //二维数组

        $cc=array(
     array('name'=>'adam','opp'=>'ensan','kk'=>'kishi'),
     array('at'=>'haywan','zmin'=>'kala','kun'=>'et'),

            );
        $this->assign('cc',$cc);
         $this->display();
     }

     public function register(){
        $sex='女';
        $this->assign('sex',$sex);
        $name='';
        $this->assign('name',$name);
       $kk=array('php','HTML','CSS','JS','AJAX','JQury','MYSQL');

       $arr1=array(
       array('name'=>"康博",'city'=>"沧州",'sex'=>"男"),
       array('name'=>"小红",'city'=>"北京",'sex'=>"女"),
      array('name' =>'涛涛','city'=>"安徽",'sex'=>"其他"),
        );
        $this->assign('arr1',$arr1);

       $arr=array(
     array('adam','bala','kala'),
     array('haywan','aske','bir'),
        );
       $this->assign('arr',$arr);
       $this->assign('kk',$kk);
      
        $this->display();
     }

     public function goods(){
        $goods = new goods();
        $goods->name='sakal';
        $goods->sex='kiz';
        $this->assign('goods',$goods);
         $time=time();
   $this->assign('time',$time);
   $password='alimjan';
   $this->assign('password',$password); 
        $this->display('login');
        //dump($goods);
     }

     public function switch1() {
       $score='68';
       define('NAME','张三');
       $this->assign('score',$score);
       $this->display();
     }

 }
